package common

import "yuanxin-admin/internal/utils"

const DefaultRsaPrivateKey = "MIICeAIBADANBgkqhkiG9w0BAQEFAASCAmIwggJeAgEAAoGBAOCQr1tpO1WlRargcV3u1ejQYXxTMzQT+wMLWkhaoaBRZOxcSK7He6V7aHviyNH8T6zwlJwrp12tP9PjR85GZevplR8VeWTHTjVBdGBBxeWIYw7/F3DkYnh/kqMu5zH+NRNuZstTZnqmxwhkSg4XzgYj4ZpFZWilJ52kXPHw2jO1AgMBAAECgYA8rjwEOmpDGVa69s0LcdcxguVkv+KtJt0EFJQ/yuWzuWrJB6LIP7UkoTU5jK1xOHmbJKMzlAQ0pvUBX3/uuE0fsbjrSYWeXB447W/j6W/AVZIP/ghoB/hEUHMPpW3izBlc7oQ7zawvur+LDPmPO2Zc3zLqzH8cBbU2v/dE+2dfgQJBAPDk3W0QHT0ygp+UCHHKWv6wUGkV7ghTq7rSGJ8GKZDmFLVmPB5SYxyHNQAxPHvpZ5v6sCto3bbRFrfJa2BP2FUCQQDupbBl+SHQNgV4PvO3AfLNx6dwzhcsBhB79gqP6ipxJsrqE+Hh07MOzmSblZ0icLF5dq299h3kgSpYhLWFrc3hAkEAwuV33IhgD6YxFqjvGBlO+6ZsuEi819HSLAlVUDvtH0V3VbhMRYAEng0qLWioddxGLmVpaQWj9AhAqBt3G2oeLQJBAImsrIcnoooroBwutQru5NQySjaZrmSHWxsoZg+AV9vPNWC096sAJlx0VTYsqeokeT5JaRId2kDpAzTt2oq0KgECQQCG2Qqw7G9+H4e61213Aw4rhf7gv15CaLCt+kQTkZ3eqWN1O+TPt6qPc3oyckLq47HT7rQEz4imG6wp070mKPRn"
const DefaultRsaPublicKey = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDgkK9baTtVpUWq4HFd7tXo0GF8UzM0E/sDC1pIWqGgUWTsXEiux3ule2h74sjR/E+s8JScK6ddrT/T40fORmXr6ZUfFXlkx041QXRgQcXliGMO/xdw5GJ4f5KjLucx/jUTbmbLU2Z6pscIZEoOF84GI+GaRWVopSedpFzx8NoztQIDAQAB"

func DePsw(str string) (string, error) {
	return utils.RsaDecrypt(DefaultRsaPrivateKey, str)
}

func EnPsw(str string) (string, error) {
	return utils.RsaEncrypt(DefaultRsaPublicKey, str)
}
